<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>推箱子</title>
    <link rel="stylesheet" href="./index.css">
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.7.9/vue.js"></script>
    <script src="./index.js" defer></script>
</head>

<body>
    <div id="app">
        <div class="text">执行了：{{step}}步</div>
        <div class="wrap">
            <div class="row" v-for="(row,rowIndex) in map">
                <div class="box" v-for="(box,colIndex) in row">
                    <img v-if="isUser(rowIndex,colIndex)" src="./img/user.png" alt="">
                    <img v-else-if="isBox(rowIndex,colIndex)" src="./img/box.png" alt="">
                    <img v-else-if="box===1" src="./img/wall.png" alt="">
                    <img v-else-if="box===2" src="./img/hole.png" alt="">
                </div>
            </div>
        </div>
        <div class="btn">
            <button @click="restart">重新开始游戏</button>
        </div>
    </div>
</body>

</html>